
#include <iostream>
#include <cassert>
#include <array>
#include "../VarArray.hpp"
// #include "../vararray_new.hpp"
using namespace std;
// using namespace VarArray_new;

int main()
{
    VarArray<int, 2> test{2, 3};
    cout << test.Dim(1) << "\n";
    VarArray<double, 3> a{2, 2, 2};
    cout << a.Dim(2) << "\n";

    VarArray<int, 3> b(2, 3, 4);
    cout << sizeof(b) << endl;

    VarArray<int, 1> d(2);
    cout << sizeof(d) << endl;

    cout << sizeof(array<int, 1>) << endl;

    // fortran index
    VarArray<int, 3, 0> fa;
    fa.ReConstruct(2, 2, 2);
    int *data = fa.data();
    for(int i = 0; i < 8; ++i)
    {
        data[i] = i+1;
    }
    for(int k = 0; k < 2; ++k)
    {
        for(int j = 0; j < 2; ++j)
        {
            for(int i = 0; i < 2; ++i)
            {
                cout << fa(i, j, k) << "\n";
            }
        }
    }
    return 0;
}